<template>
	<view class="container">
		<!-- 多行输入文本域 -->
		<view class="input">
			<textarea class="text_area" placeholder="请输入您要说的话(不超过200字)" maxlength="200" @input="inputtext" v-model="text"></textarea>
		</view>
		<view class="text1">尊敬的VS会员：请尽可能的详细描述您要反馈的内容，并加上您的联系电话，以便客服能更快速的处理你需要解决的问题。</view>
		<view class="t-apply" :class="{'t-apply-moment':flag}" @click="submitBtn">提交</view>
	</view>
	
</template>

<script>
	import {speak} from '../../../api/speak.js'
	export default {
		data(){
			return{
				text:'',
				flag:false
			}
		},
		methods:{
			inputtext(){
				if(this.text.trim()!=""){
					this.flag=true;
				}else{
					this.flag=false;
				}
			},
			submitBtn(){
				this.get(speak,{content:this.text}).then(res => {
					setTimeout(()=>{
						uni.navigateBack({
							delta:1
						})
					},1500)
					this.msg("提交成功")
				})
			}
		}
	}
</script>

<style>
	.container{
		padding: 0 30rpx;
	}
	.input{
		margin-top: 30rpx;
		width: 690rpx;
		height: 293rpx;
		padding: 20rpx;
		border: 1px solid #CCCCCC;
		border-radius: 12rpx;
	}
	.text_area{
		width: 100%;
		height: 100%;
	}
	.text1{
		font-size: 32rpx;
		font-weight: 300;
		color: #333333;
		margin-top: 30rpx;
	}
	.t-apply{
		width: 460rpx;
		height: 88rpx;
		background: #F0812D;
		opacity: 0.3;
		border-radius: 8rpx;
		margin: 68rpx auto;
		font-size: 30rpx;
		font-weight: 400;
		line-height: 88rpx;
		color: #FFFFFF;
		text-align: center;
	}
	.t-apply-moment{
		background: #F0812D;
		opacity: 1;
	}
</style>
